﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameInterface
{
    public delegate void PlayerDelegate();   
    public delegate void SurrenderDelegate(String Message);
    public delegate void SendGIDDelegate(int GID);
    public delegate void SendChatDelegate(int GID, String message);
    public delegate void SendRdyCheck(int GID, String PlayerMessage);
    public delegate void ShipHit(int GID, bool hit, string player, int xcord, int ycord, int dead);
    public delegate void SendStarter(int GID, String starter);
    public delegate void SendNextTurn(int GID, String NextTurn);

    public interface IGame
    {
        
        //event PlayerDelegate event_player_status;
        //event MessageDelegate event_not_ready;
        event SendGIDDelegate event_send_GID;
        event SurrenderDelegate event_player_surrender;
        event SendChatDelegate event_send_msg;
        event SendRdyCheck event_rdy_check;
        event ShipHit event_ship_hit;
        event SendStarter event_send_starter;
        event SendNextTurn event_send_turn;

        void newGame(int Size, string Inviter, string Invitee);

        int StillThere(int GID);       

        void Surrender(int GID, string playerName);

        void Start_Battle_Phase(int GID, bool Response, string playerName);

        void chat(int GID, string Message, string chatter);

        void set_ship(int GID, int type, int xCord, int yCord, bool horizontal, string whosShips);

        void playerRdy(int GID, string playerName);

        void checkShot(int GID, int xcord, int ycord, string player, out int deadShip);

        void endTurn(int GID, string player); 
    }

    //[Serializable]

    //public class Ship
    //{
    //    public int type{ get;set;}
    //    public int X{ get;set;}
    //    public int Y{ get;set;}
    //    public bool rotate { get;set;}
    //    public bool[] hist { get;set;}
    //}
}